<?php
session_start();
require 'anti_csrf.php';
$name="CSRFGuard_".mt_rand(0,mt_getrandmax());
$token=csrfguard_generate_token($name);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd"
    >
<html lang="en">
<head>
    <title>TechBay | Signup</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>
    <script src="../js/signup.js" type="text/javascript"></script>
    <link href="../css/techbey.css" rel="stylesheet" type="text/css">
</head>
<body>
    <script>if (top != self) { top.location = self.location; }</script>
    <div id="headerBar">
        <div class="container">
            <div class="left">
                <a href="/"><h1 title="logo" id="Logo">T<span id="ech">ech</span>BAY</h1></a>
            </div>
        </div>
    </div>
    <div id="wrapper">
        <div class="left" id="left_navigation">
            
        </div>
        <div id="main">
        <div class="container">
            <form id="signupForm" class="mainForm" method="post" action="signup_submit.php">
                <?php
                    echo '<input type="hidden" name="CSRFName" value="'.$name.'" />';
                    echo '<input type="hidden" name="CSRFToken" value="'.$token.'" />';
                ?>
                <table>
                    <tr>
                        <td><a class="textSignupForm">Username:</a></td>
                        <td>
                            <input type="text" id="signup_username" name="username">
                        </td>
                    </tr>
                    <tr>
                        <td><a class="textSignupForm">Password:</a></td>
                        <td>
                            <input type="password" id="signup_password" name="password">
                        </td>
                    </tr>
                    <tr>
                        <td/>
                        <td>
                            <a id="pwreq">8-70 characters. Upper-case, lower-case and numeric characters at least once.</a>
                        </td>
                    </tr>
                    <tr>
                        <td><a class="textSignupForm">Real Name:</a></td>
                        <td>
                            <input type="text" id="signup_realname" name="realname">
                        </td>
                    </tr>
                    <tr>
                        <td><a class="textSignupForm">Email:</a></td>
                        <td>
                            <input type="text" id="signup_emailaddr" name="emailaddr">
                        </td>
                    </tr>
                    <tr>
                        <td><a class="textSignupForm">ID:</a></td>
                        <td>
                            <input type="text" id="signup_ID" name="ID">
                        </td>
                    </tr>
                    <tr>
                        <td><a class="textSignupForm">Street Address:</a></td>
                        <td>
                            <input type="text" id="signup_streetaddr" name="streetaddr">
                        </td>
                    </tr>
                    <tr>
                        <td><a class="textSignupForm">Zipcode:</a></td>
                        <td>
                            <input type="text" id="signup_zipcode" name="zipcode">
                        </td>
                    </tr>
                    <tr>
                        <td><a class="textSignupForm">Phone Number:</a></td>
                        <td>
                            <input type="text" id="signup_phonenum" name="phonenum">
                        </td>
                    </tr>
                    <tr>
                        <td><img class="visual_captcha" id="captcha" src="visual-captcha.php"></td>
                        <td>
                            <input type="text" id="signup_captcha" name="signup_captcha">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <a class="mainbtn" id="change_image" href="/">Change Image</a>
                        </td>
                        <td>
                            <input type="submit" class="right" value="Create Account">
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
        <div class="right" id="right_navigation">
            
        </div>
    </div>
    <div id="footerBar">
        <div class="container">
            <p class="textInFooter">Jie Dong &amp; Fang Yang 2012</p>
        </div>  
    </div>
</body>
</html>
